source('../env.R')
Birdlife dataset “Bird Species Distribution Maps of the World.” (2020).
A download of the birdlife distributions can be requested from here: https://datazone.birdlife.org/species/requestdis
BIRDLIFE_DISTRIBUTIONS = '/Users/james/Dropbox/PhD/BirdLife/Distribution/SppDataRequest_columbidae/SppDataRequest.shp'
birdlife = st_read(BIRDLIFE_DISTRIBUTIONS)
Reading layer `SppDataRequest' from data source `/Users/james/Dropbox/PhD/BirdLife/Distribution/SppDataRequest_columbidae/SppDataRequest.shp' using driver `ESRI Shapefile'
Simple feature collection with 529 features and 16 fields
Geometry type: MULTIPOLYGON
Dimension: XY
Bounding box: xmin: -180 ymin: -55.72332 xmax: 180 ymax: 70.13647
Geodetic CRS: WGS 84
head(birdlife)
Simple feature collection with 6 features and 16 fields
Geometry type: MULTIPOLYGON
Dimension: XY
Bounding box: xmin: -180 ymin: -46.62738 xmax: 180 ymax: 65.45892
Geodetic CRS: WGS 84
SISID SCI_NAME PRESENCE ORIGIN SEASONAL
1 22690059 Raphus cucullatus 5 1 1
2 22690062 Pezophaps solitaria 5 1 1
3 22690066 Columba livia 1 3 1
4 22690066 Columba livia 1 1 1
5 22690074 Columba rupestris 1 1 3
6 22690074 Columba rupestris 1 1 1
SOURCE
1 Cheke, 1987; Hachisuka, 1953; Livezey, 1993; Owadally, 1979; Strickland and Melville, 1848; Temple, 1977 ;Roberts and Solow, 2004; Cheke, 2006
2 Cheke, 1987; Cowles, 1987; Hachisuka, 1953
3 Cramp, 1997; Rasmussen, 2004; Flint, 1984; Ding, 2001; Porter, 1996; Urban, 1986; Gibbs et al, 2001
4 Cramp, 1997; Rasmussen, 2004; Flint, 1984; Ding, 2001; Porter, 1996; Urban, 1986; Gibbs et al, 2001; eBird 2019
5 Grimmett et al., 2008
6 Gibbs et al., 2001; Rasmussen and Anderton, 2005; Spierenburg, 2005; Grimmett et al., 2008; Brazil, 2009
COMPILER DATA_SENS SENS_COMM DIST_COMM TAX_COMM GENERALISD
1 Philip Martin (BirdLife International) 0 <NA> <NA> <NA> 0
2 Philip Martin (BirdLife International) 0 <NA> <NA> <NA> 0
3 BirdLife International 0 <NA> <NA> <NA> 0
4 Lynda Donaldson (BirdLife International); Donal Smith (BirdLife International) 0 <NA> <NA> <NA> 0
5 Joe Taylor (BirdLife International) 0 <NA> <NA> <NA> 0
6 Joe Taylor (BirdLife International) 0 <NA> <NA> <NA> 0
CITATION YRCOMPILED YRMODIFIED VERSION geometry
1 BirdLife International and Handbook of the Birds of the World 2010 2016 2022.2 MULTIPOLYGON (((57.64288 -2...
2 BirdLife International and Handbook of the Birds of the World 2010 2016 2022.2 MULTIPOLYGON (((63.47229 -1...
3 BirdLife International and Handbook of the Birds of the World 2006 2016 2022.2 MULTIPOLYGON (((5.383484 53...
4 BirdLife International and Handbook of the Birds of the World 2016 2019 2022.2 MULTIPOLYGON (((88.3183 21....
5 BirdLife International and Handbook of the Birds of the World 2010 2016 2022.2 MULTIPOLYGON (((75.19348 36...
6 BirdLife International and Handbook of the Birds of the World 2010 2016 2022.2 MULTIPOLYGON (((120.8933 36...
Load the birdlife taxonomy to find Columbidae species.
The taxonomy can be downloaded here: https://datazone.birdlife.org/species/taxonomy
st_crs(birdlife)
Coordinate Reference System:
User input: WGS 84
wkt:
GEOGCRS["WGS 84",
DATUM["World Geodetic System 1984",
ELLIPSOID["WGS 84",6378137,298.257223563,
LENGTHUNIT["metre",1]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
CS[ellipsoidal,2],
AXIS["latitude",north,
ORDER[1],
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["longitude",east,
ORDER[2],
ANGLEUNIT["degree",0.0174532925199433]],
ID["EPSG",4326]]
BIRDLIFE_TAXONOMY = '/Users/james/Dropbox/PhD/BirdLife/Taxonomy/Handbook of the Birds of the World and BirdLife International Digital Checklist of the Birds of the World_Version_8.xlsx'
birdlifeTaxonomyWb = read_excel(BIRDLIFE_TAXONOMY)
New names:
birdlifeTaxonomyWb
names(birdlifeTaxonomyWb) <- birdlifeTaxonomyWb[2,]
Warning: The `value` argument of `names<-` must be a character vector as of tibble 3.0.0.
birdlifeTaxonomy <- birdlifeTaxonomyWb[-2,]
birdlifeTaxonomy
birdlifeColumbidae = birdlifeTaxonomy[!is.na(birdlifeTaxonomy$Order) & birdlifeTaxonomy$Order == 'COLUMBIFORMES', c('SISRecID', 'Scientific name', 'Common name', 'Synonyms')]
names(birdlifeColumbidae) = c('birdlife_id', 'species_name', 'common_name', 'synonyms')
birdlifeColumbidae
Check to see if we have any missing distributions
birdlifeColumbidae[!(birdlifeColumbidae$species_name %in% birdlife$SCI_NAME),]
Most of those species are extinct. The species not extinct are: * Nesoenas picturata (?) * Geotrygon lawrencii (previously considered conspecific of Zentrygon carrikeri) - not a species recognised by birdlife http://datazone.birdlife.org/species/factsheet/22729899 * Gallicolumba beccarii - not a species recognised by birdlife http://datazone.birdlife.org/species/factsheet/22691066 * Geophaps ferruginea - not a species recognised by birdlife http://datazone.birdlife.org/species/factsheet/22725184 - lumped in with G. plumifera * Ducula constans - not a species recognised by birdlife http://datazone.birdlife.org/species/factsheet/ducula-constans * Ducula salvadorii - not a species recognised by birdlife http://datazone.birdlife.org/species/factsheet/45448199 - previously lumped as D. pinon * Ptilinopus subgularis - not a species recognised by birdlife http://datazone.birdlife.org/species/factsheet/22691351 * Ramphiculus meridionalis - not a species recognised by birdlife http://datazone.birdlife.org/species/factsheet/22728045 - previously placed in the genus Ptilinopus and lumped as P. fischeri * Stigmatopelia chinensis - not a species recognised by birdlife http://datazone.birdlife.org/species/factsheet/stigmatopelia-chinensis
Extinct species: * Caloenas maculata * Nesoenas rostrata * Gallicolumba norfolciensis
birdlifeColumbidae[birdlifeColumbidae$species_name == 'Nesoenas picturata',]
birdlife[birdlife$SCI_NAME == 'Nesoenas picturatus',]
Simple feature collection with 2 features and 16 fields
Geometry type: MULTIPOLYGON
Dimension: XY
Bounding box: xmin: 43.19138 ymin: -25.60895 xmax: 72.49316 ymax: -3.71152
Geodetic CRS: WGS 84
SISID SCI_NAME PRESENCE ORIGIN SEASONAL SOURCE
84 22690364 Nesoenas picturatus 1 1 1 Langrand, 1990; Gibbs et al, 2001; Skerrett et al, 2001; Roger Safford, pers. comm.
85 22690364 Nesoenas picturatus 1 3 1 Sinclair, 1998; Gibbs et al, 2001; Roger Safford, pers. comm.
COMPILER DATA_SENS SENS_COMM DIST_COMM TAX_COMM GENERALISD
84 Richard Johnson; Joe Taylor (BirdLife International) 0 <NA> <NA> <NA> 0
85 Richard Johnson; Joe Taylor (BirdLife International) 0 <NA> <NA> <NA> 0
CITATION YRCOMPILED YRMODIFIED VERSION geometry
84 BirdLife International and Handbook of the Birds of the World 2013 2016 2022.2 MULTIPOLYGON (((44.41069 -1...
85 BirdLife International and Handbook of the Birds of the World 2013 2016 2022.2 MULTIPOLYGON (((55.45396 -2...
birdlifeColumbidae[birdlifeColumbidae$birdlife_id == '22690364',]
Already present, update synonyms
birdlifeColumbidae$synonyms[birdlifeColumbidae$birdlife_id == '22690364'] = 'Columba picturata; Streptopelia picturata,Nesoenas picturata'
Previously considered conspecific of Zentrygon carrikeri
http://datazone.birdlife.org/species/factsheet/22729899
birdlifeColumbidae[birdlifeColumbidae$species_name == 'Geotrygon lawrencii',]
birdlife[birdlife$SCI_NAME == 'Zentrygon carrikeri',]
Simple feature collection with 1 feature and 16 fields
Geometry type: MULTIPOLYGON
Dimension: XY
Bounding box: xmin: -95.2132 ymin: 18.29449 xmax: -94.71039 ymax: 18.56891
Geodetic CRS: WGS 84
SISID SCI_NAME PRESENCE ORIGIN SEASONAL SOURCE COMPILER DATA_SENS SENS_COMM DIST_COMM TAX_COMM GENERALISD
212 22690901 Zentrygon carrikeri 1 1 1 BirdLife International BirdLife International 0 <NA> <NA> <NA> 0
CITATION YRCOMPILED YRMODIFIED VERSION geometry
212 BirdLife International and Handbook of the Birds of the World 1999 2020 2022.2 MULTIPOLYGON (((-94.8493 18...
birdlifeColumbidae[birdlifeColumbidae$birdlife_id == '22690901',]
Already present, update synonyms
birdlifeColumbidae$synonyms[birdlifeColumbidae$birdlife_id == '22690901'] = 'Geotrygon carrikeri,Geotrygon lawrencii'
http://datazone.birdlife.org/species/factsheet/22691066
birdlifeColumbidae[birdlifeColumbidae$species_name == 'Gallicolumba beccarii',]
birdlife[birdlife$SCI_NAME == 'Pampusana beccarii',]
Simple feature collection with 1 feature and 16 fields
Geometry type: MULTIPOLYGON
Dimension: XY
Bounding box: xmin: 132.1133 ymin: -10.22302 xmax: 149.9799 ymax: -0.4857788
Geodetic CRS: WGS 84
SISID SCI_NAME PRESENCE ORIGIN SEASONAL SOURCE
504 60444792 Pampusana beccarii 1 1 1 Coates, 1985; del Hoyo et al, 1997; Doughty, 1999; Gibbs et al, 2001; Mayr, 2001
COMPILER DATA_SENS SENS_COMM DIST_COMM TAX_COMM GENERALISD
504 Richard Johnson; Joe Taylor (BirdLife International) 0 <NA> <NA> <NA> 0
CITATION YRCOMPILED YRMODIFIED VERSION geometry
504 BirdLife International and Handbook of the Birds of the World 2013 2016 2022.2 MULTIPOLYGON (((136.7927 -3...
birdlifeColumbidae[birdlifeColumbidae$birdlife_id == '60444792',]
Already present, update synonyms
birdlifeColumbidae$synonyms[birdlifeColumbidae$birdlife_id == '60444792'] = 'Gallicolumba beccarii'
http://datazone.birdlife.org/species/factsheet/22725184 - lumped in with G. plumifera
birdlifeColumbidae[birdlifeColumbidae$species_name == 'Geophaps ferruginea',]
birdlife[birdlife$SCI_NAME == 'Geophaps plumifera',]
Simple feature collection with 1 feature and 16 fields
Geometry type: MULTIPOLYGON
Dimension: XY
Bounding box: xmin: 113.5466 ymin: -28.14721 xmax: 145.6556 ymax: -13.85436
Geodetic CRS: WGS 84
SISID SCI_NAME PRESENCE ORIGIN SEASONAL SOURCE
140 22690682 Geophaps plumifera 1 1 1 del Hoyo et al, 1999; Morcombe, 2000; Gibbs et al, 2001; Barrett et al, 2003
COMPILER DATA_SENS SENS_COMM DIST_COMM TAX_COMM GENERALISD
140 Mia Derhe; Joe Taylor (BirdLife International); Donal Smith (BirdLife International) 0 <NA> <NA> <NA> 0
CITATION YRCOMPILED YRMODIFIED VERSION geometry
140 BirdLife International and Handbook of the Birds of the World 2019 2019 2022.2 MULTIPOLYGON (((135.6649 -1...
birdlifeColumbidae[birdlifeColumbidae$birdlife_id == '22690682',]
Already present, update synonyms
birdlifeColumbidae$synonyms[birdlifeColumbidae$birdlife_id == '22690682'] = 'Geophaps ferruginea'
http://datazone.birdlife.org/species/factsheet/ducula-constans
birdlifeColumbidae[birdlifeColumbidae$species_name == 'Ducula constans',]
birdlife[birdlife$SCI_NAME == 'Ducula spilorrhoa',]
Simple feature collection with 1 feature and 16 fields
Geometry type: MULTIPOLYGON
Dimension: XY
Bounding box: xmin: 123.8503 ymin: -21.95601 xmax: 154.2817 ymax: -0.6268331
Geodetic CRS: WGS 84
SISID SCI_NAME PRESENCE ORIGIN SEASONAL
488 22733554 Ducula spilorrhoa 1 1 1
SOURCE
488 Rand and Gilliard, 1967; del Hoyo et al, 1997; Ding, 2001; Gibbs et al, 2001; Strange, 2001; Robson, 2002; Barrett et al, 2003; Robson, 2008; Myers, 2009
COMPILER DATA_SENS SENS_COMM DIST_COMM TAX_COMM GENERALISD
488 Rob Martin, Joe Taylor (BirdLife International) 0 <NA> <NA> <NA> 0
CITATION YRCOMPILED YRMODIFIED VERSION geometry
488 BirdLife International and Handbook of the Birds of the World 2014 2016 2022.2 MULTIPOLYGON (((137.8399 -5...
birdlifeColumbidae[birdlifeColumbidae$birdlife_id == '22733554',]
Already present, update synonyms
birdlifeColumbidae$synonyms[birdlifeColumbidae$birdlife_id == '22733554'] = 'Ducula constans'
http://datazone.birdlife.org/species/factsheet/45448199 - previously lumped as D. pinon
birdlifeColumbidae[birdlifeColumbidae$species_name == 'Ducula salvadorii',]
birdlife[birdlife$SCI_NAME == 'Ducula pinon',]
Simple feature collection with 1 feature and 16 fields
Geometry type: MULTIPOLYGON
Dimension: XY
Bounding box: xmin: 129.7127 ymin: -11.65778 xmax: 154.2817 ymax: 0.03948975
Geodetic CRS: WGS 84
SISID SCI_NAME PRESENCE ORIGIN SEASONAL SOURCE COMPILER
389 22691760 Ducula pinon 1 1 1 Coates, 1985; Strange, 2001; Gibbs et al, 2001; del Hoyo et al, 1997 Jemma Vine (BirdLife International)
DATA_SENS SENS_COMM DIST_COMM TAX_COMM GENERALISD CITATION YRCOMPILED YRMODIFIED VERSION
389 0 <NA> <NA> <NA> 0 BirdLife International and Handbook of the Birds of the World 2013 2023 2023.1
geometry
389 MULTIPOLYGON (((144.2385 -3...
birdlifeColumbidae[birdlifeColumbidae$birdlife_id == '22691760',]
Already present, update synonyms
birdlifeColumbidae$synonyms[birdlifeColumbidae$birdlife_id == '22691760'] = 'Ducula salvadorii'
http://datazone.birdlife.org/species/factsheet/22691351
birdlifeColumbidae[birdlifeColumbidae$species_name == 'Ptilinopus subgularis',]
birdlife[birdlife$SCI_NAME == 'Ramphiculus subgularis',]
Simple feature collection with 2 features and 16 fields
Geometry type: MULTIPOLYGON
Dimension: XY
Bounding box: xmin: 122.7788 ymin: -1.767872 xmax: 123.6186 ymax: -1.15033
Geodetic CRS: WGS 84
SISID SCI_NAME PRESENCE ORIGIN SEASONAL SOURCE COMPILER
466 22728146 Ramphiculus subgularis 1 1 1 Davidson et al, 1995; del Hoyo et al, 1997; Gibbs et al, 2001 Joe Taylor (BirdLife International)
467 22728146 Ramphiculus subgularis 1 1 1 Davidson et al, 1995; del Hoyo et al, 1997; Gibbs et al, 2001 Joe Taylor (BirdLife International)
DATA_SENS SENS_COMM DIST_COMM TAX_COMM GENERALISD CITATION YRCOMPILED YRMODIFIED VERSION
466 0 <NA> <NA> <NA> 0 BirdLife International and Handbook of the Birds of the World 2012 2016 2022.2
467 0 <NA> <NA> <NA> 0 BirdLife International and Handbook of the Birds of the World 2012 2016 2022.2
geometry
466 MULTIPOLYGON (((123.1666 -1...
467 MULTIPOLYGON (((123.1666 -1...
birdlifeColumbidae[birdlifeColumbidae$birdlife_id == '22728146',]
Already present, update synonyms
birdlifeColumbidae$synonyms[birdlifeColumbidae$birdlife_id == '22728146'] = 'Ptilinopus subgularis'
http://datazone.birdlife.org/species/factsheet/22728045 - previously placed in the genus Ptilinopus and lumped as P. fischeri
birdlifeColumbidae[birdlifeColumbidae$species_name == 'Ramphiculus meridionalis',]
birdlife[birdlife$SCI_NAME == 'Ramphiculus fischeri',]
Simple feature collection with 1 feature and 16 fields
Geometry type: MULTIPOLYGON
Dimension: XY
Bounding box: xmin: 118.9495 ymin: -5.448394 xmax: 125.0379 ymax: 1.47724
Geodetic CRS: WGS 84
SISID SCI_NAME PRESENCE ORIGIN SEASONAL SOURCE COMPILER DATA_SENS SENS_COMM DIST_COMM TAX_COMM
303 22691332 Ramphiculus fischeri 1 1 1 Gibbs et al, 2001 Jemma Vine (BirdLife International) 0 <NA> <NA> <NA>
GENERALISD CITATION YRCOMPILED YRMODIFIED VERSION geometry
303 0 BirdLife International and Handbook of the Birds of the World 2023 2023 2023.1 MULTIPOLYGON (((120.1059 -1...
birdlifeColumbidae[birdlifeColumbidae$birdlife_id == '22691332',]
Already present, update synonyms
birdlifeColumbidae$synonyms[birdlifeColumbidae$birdlife_id == '22691332'] = 'Ramphiculus meridionalis'
birdlifeColumbidae[birdlifeColumbidae$species_name == 'Stigmatopelia chinensis',]
birdlife[birdlife$SCI_NAME == 'Spilopelia chinensis',]
Simple feature collection with 2 features and 16 fields
Geometry type: MULTIPOLYGON
Dimension: XY
Bounding box: xmin: -180 ymin: -43.24591 xmax: 180 ymax: 40.87189
Geodetic CRS: WGS 84
SISID SCI_NAME PRESENCE ORIGIN SEASONAL
506 60482887 Spilopelia chinensis 1 3 1
507 60482887 Spilopelia chinensis 1 1 1
SOURCE
506 Pratt, 1987; Higgins & Davies, 1996; del Hoyo et al, 1997; Gibbs et al, 2001; Strange, 2001
507 Pratt, 1987; del Hoyo et al, 1997; Doughty, 1999; Ding, 2001; Gibbs et al, 2001; Rasmussen and Anderton, 2005
COMPILER DATA_SENS SENS_COMM DIST_COMM TAX_COMM GENERALISD
506 Richard Johnson; Joe Taylor (BirdLife International) 0 <NA> <NA> <NA> 0
507 Richard Johnson; Joe Taylor (BirdLife International) 0 <NA> <NA> <NA> 0
CITATION YRCOMPILED YRMODIFIED VERSION geometry
506 BirdLife International and Handbook of the Birds of the World 2013 2016 2022.2 MULTIPOLYGON (((144.7167 -1...
507 BirdLife International and Handbook of the Birds of the World 2013 2016 2022.2 MULTIPOLYGON (((88.3183 21....
birdlifeColumbidae[birdlifeColumbidae$birdlife_id == '60482887',]
Already present, update synonyms
birdlifeColumbidae$synonyms[birdlifeColumbidae$birdlife_id == '60482887'] = 'Streptopelia chinensis,Stigmatopelia chinensis'
write_csv(birdlifeColumbidae[birdlifeColumbidae$species_name %in% birdlife$SCI_NAME,], filename(BIRDLIFE_WORKING_OUTPUT_DIR, 'taxonomy.csv'))
birdlifeColumbidae = read_csv(filename(BIRDLIFE_WORKING_OUTPUT_DIR, 'taxonomy.csv'))
Rows: 415 Columns: 4── Column specification ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Delimiter: ","
chr (3): species_name, common_name, synonyms
dbl (1): birdlife_id
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
head(birdlifeColumbidae)
Do we have any distributions not in our taxonomy?
birdlife[!(birdlife$SCI_NAME %in% birdlifeColumbidae$species_name),]
Simple feature collection with 0 features and 16 fields
Bounding box: xmin: NA ymin: NA xmax: NA ymax: NA
Geodetic CRS: WGS 84
[1] SISID SCI_NAME PRESENCE ORIGIN SEASONAL SOURCE COMPILER DATA_SENS SENS_COMM DIST_COMM TAX_COMM GENERALISD CITATION YRCOMPILED
[15] YRMODIFIED VERSION geometry
<0 rows> (or 0-length row.names)
COLUMBIDAE_WORLD_DISTRIBUTIONS = filename(BIRDLIFE_WORKING_OUTPUT_DIR, "columbidae_world.shp")
write_sf(birdlife, COLUMBIDAE_WORLD_DISTRIBUTIONS)
Warning: GDAL Message 1: Value 154619350 of field SISID of feature 519 not successfully written. Possibly due to too larger number with respect to field widthWarning: GDAL Message 1: Value 154619546 of field SISID of feature 520 not successfully written. Possibly due to too larger number with respect to field widthWarning: GDAL Message 1: Value 154625310 of field SISID of feature 521 not successfully written. Possibly due to too larger number with respect to field widthWarning: GDAL Message 1: Value 154625453 of field SISID of feature 522 not successfully written. Possibly due to too larger number with respect to field widthWarning: GDAL Message 1: Value 154625942 of field SISID of feature 523 not successfully written. Possibly due to too larger number with respect to field widthWarning: GDAL Message 1: Value 200093329 of field SISID of feature 524 not successfully written. Possibly due to too larger number with respect to field widthWarning: GDAL Message 1: Value 200094385 of field SISID of feature 525 not successfully written. Possibly due to too larger number with respect to field widthWarning: GDAL Message 1: Value 219582631 of field SISID of feature 526 not successfully written. Possibly due to too larger number with respect to field widthWarning: GDAL Message 1: Value 232609896 of field SISID of feature 527 not successfully written. Possibly due to too larger number with respect to field widthWarning: GDAL Message 1: Value 232610475 of field SISID of feature 528 not successfully written. Possibly due to too larger number with respect to field width
columbidaeDistribution = read_sf(COLUMBIDAE_WORLD_DISTRIBUTIONS)
Free up memory by removing birdlife data from workspace
rm(birdlife)
rm(birdlifeTaxonomy)
rm(birdlifeTaxonomy_tmp)
Warning: object 'birdlifeTaxonomy_tmp' not found
rm(birdlifeTaxonomyWb)
rm(birdlifeTaxonomyWb_Sheets)
Warning: object 'birdlifeTaxonomyWb_Sheets' not found
st_crs(columbidaeDistribution)
Coordinate Reference System:
User input: WGS 84
wkt:
GEOGCRS["WGS 84",
DATUM["World Geodetic System 1984",
ELLIPSOID["WGS 84",6378137,298.257223563,
LENGTHUNIT["metre",1]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
CS[ellipsoidal,2],
AXIS["latitude",north,
ORDER[1],
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["longitude",east,
ORDER[2],
ANGLEUNIT["degree",0.0174532925199433]],
ID["EPSG",4326]]
Read in our initial city vectors, we will join these to our checklists
initial_city_selection = read_sf(filename(mkdir(GEO_WORKING_OUTPUT_DIR, 'cities'), 'initial_selection.shp'))
st_crs(initial_city_selection)
Coordinate Reference System:
User input: WGS 84
wkt:
GEOGCRS["WGS 84",
DATUM["World Geodetic System 1984",
ELLIPSOID["WGS 84",6378137,298.257223563,
LENGTHUNIT["metre",1]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
CS[ellipsoidal,2],
AXIS["latitude",north,
ORDER[1],
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["longitude",east,
ORDER[2],
ANGLEUNIT["degree",0.0174532925199433]],
ID["EPSG",4326]]
sf::sf_use_s2(FALSE)
urban_columbidae_distributions = st_join(initial_city_selection, columbidaeDistribution)
although coordinates are longitude/latitude, st_intersects assumes that they are planar
urban_columbidae_distributions
Simple feature collection with 6633 features and 20 fields
Geometry type: POLYGON
Dimension: XY
Bounding box: xmin: -158.043 ymin: -38.20685 xmax: 174.9891 ymax: 60.3276
Geodetic CRS: WGS 84
Species with unknown presence?
urban_columbidae_distributions[urban_columbidae_distributions$PRESENCE > 5, c('SCI_NAME', 'city_name', 'city_id')]
Simple feature collection with 1 feature and 3 fields
Geometry type: POLYGON
Dimension: XY
Bounding box: xmin: 116.0291 ymin: -8.698981 xmax: 116.27 ymax: -8.479668
Geodetic CRS: WGS 84
Any extinct species?
urban_columbidae_distributions[urban_columbidae_distributions$PRESENCE == 5, c('SCI_NAME', 'city_name', 'city_id')]
Simple feature collection with 38 features and 3 fields
Geometry type: POLYGON
Dimension: XY
Bounding box: xmin: -98.74208 ymin: -20.33485 xmax: 57.54632 ymax: 49.96685
Geodetic CRS: WGS 84
Possibly Extinct species
urban_columbidae_distributions[urban_columbidae_distributions$PRESENCE == 4, c('SCI_NAME', 'city_name', 'city_id')]
Simple feature collection with 40 features and 3 fields
Geometry type: POLYGON
Dimension: XY
Bounding box: xmin: -82.49902 ymin: -25.60243 xmax: 125.6809 ymax: 23.18014
Geodetic CRS: WGS 84
urban_columbidae_distributions$seasonal_desc = "Unknown Code"
urban_columbidae_distributions$seasonal_desc[urban_columbidae_distributions$SEASONAL == "1"] = "Resident"
urban_columbidae_distributions$seasonal_desc[urban_columbidae_distributions$SEASONAL == "2"] = "Breeding Season"
urban_columbidae_distributions$seasonal_desc[urban_columbidae_distributions$SEASONAL == "3"] = "Non-breeding Season"
urban_columbidae_distributions$seasonal_desc[urban_columbidae_distributions$SEASONAL == "4"] = "Passage"
urban_columbidae_distributions$seasonal_desc[urban_columbidae_distributions$SEASONAL == "5"] = "Seasonal occurence uncertain"
urban_columbidae_distributions$origin_desc = "Unknown Code"
urban_columbidae_distributions$origin_desc[urban_columbidae_distributions$ORIGIN == "1"] = "Native"
urban_columbidae_distributions$origin_desc[urban_columbidae_distributions$ORIGIN == "2"] = "Reintroduced"
urban_columbidae_distributions$origin_desc[urban_columbidae_distributions$ORIGIN == "3"] = "Introduced"
urban_columbidae_distributions$origin_desc[urban_columbidae_distributions$ORIGIN == "4"] = "Vagrant"
urban_columbidae_distributions$origin_desc[urban_columbidae_distributions$ORIGIN == "5"] = "Origin Uncertain"
urban_columbidae_distributions$origin_desc[urban_columbidae_distributions$ORIGIN == "6"] = "Assisted Colonisation"
urban_columbidae_distributions$presence_desc = "Unknown Code"
urban_columbidae_distributions$presence_desc[urban_columbidae_distributions$PRESENCE == "1"] = "Extant"
urban_columbidae_distributions$presence_desc[urban_columbidae_distributions$PRESENCE == "2"] = "Probably Extant"
urban_columbidae_distributions$presence_desc[urban_columbidae_distributions$PRESENCE == "3"] = "Possibly Extant"
urban_columbidae_distributions$presence_desc[urban_columbidae_distributions$PRESENCE == "4"] = "Possibly Extinct"
urban_columbidae_distributions$presence_desc[urban_columbidae_distributions$PRESENCE == "5"] = "Extinct"
urban_columbidae_distributions$presence_desc[urban_columbidae_distributions$PRESENCE == "6"] = "Presence Uncertain"
cache_urban_columbidae_distributions = filename(BIRDLIFE_WORKING_OUTPUT_DIR, 'urban_distributions_birdlife_only.csv')
write_csv(urban_columbidae_distributions, cache_urban_columbidae_distributions)
urban_columbidae_distributions = read_csv(cache_urban_columbidae_distributions)
Rows: 6633 Columns: 24── Column specification ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Delimiter: ","
chr (11): city_name, geometry, SCI_NAME, SOURCE, COMPILER, DIST_COMM, TAX_COMM, CITATION, seasonal_desc, origin_desc, presence_desc
dbl (12): city_id, pop_2015, bu_2015, SISID, PRESENCE, ORIGIN, SEASONAL, DATA_SENS, GENERALISD, YRCOMPILED, YRMODIFIED, VERSION
lgl (1): SENS_COMM
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Birdlife is missing the recent invasion of Streptopelia decaocto into North America. We supplement the data for Streptopelia decaocto with the range from eBird’s Status and Trends dataset.
This data can be downloaded here: https://science.ebird.org/en/status-and-trends/species/eucdov/downloads
The country boundandaries can be downloaded from the world bank here: https://datacatalog.worldbank.org/search/dataset/0038272/World-Bank-Official-Boundaries
COUNTRY_BOUNDARIES = '/Users/james/Dropbox/PhD/WorldBank_countries_Admin0_10m/WB_countries_Admin0_10m.shp'
world_map = st_simplify(st_read(COUNTRY_BOUNDARIES), dTolerance = 0.02)
Reading layer `WB_countries_Admin0_10m' from data source `/Users/james/Dropbox/PhD/WorldBank_countries_Admin0_10m/WB_countries_Admin0_10m.shp' using driver `ESRI Shapefile'
Simple feature collection with 251 features and 52 fields
Geometry type: MULTIPOLYGON
Dimension: XY
Bounding box: xmin: -180 ymin: -59.47275 xmax: 180 ymax: 83.6341
Geodetic CRS: WGS 84
Warning: st_simplify does not correctly simplify longitude/latitude data, dTolerance needs to be in decimal degrees
Existing range from Birdlife
sf::sf_use_s2(FALSE)
coldov_vect = st_simplify(columbidaeDistribution[columbidaeDistribution$SCI_NAME == 'Streptopelia decaocto', c('PRESENCE')], dTolerance = 0.02)
Warning: st_simplify does not correctly simplify longitude/latitude data, dTolerance needs to be in decimal degrees
ggplot() +
geom_sf(data = world_map, aes(geometry = geometry)) +
geom_sf(data = coldov_vect, aes(geometry = geometry), fill = "red")
Range from eBird
EBIRD_EUCDOV_RANGE = '/Users/james/Dropbox/PhD/eBird/eucdov_range_2022/eucdov_range_2022.gpkg'
eucdov_range_vect = st_read(EBIRD_EUCDOV_RANGE)
Reading layer `range' from data source `/Users/james/Dropbox/PhD/eBird/eucdov_range_2022/eucdov_range_2022.gpkg' using driver `GPKG'
Simple feature collection with 1 feature and 8 fields
Geometry type: MULTIPOLYGON
Dimension: XY
Bounding box: xmin: -129.1392 ymin: 6.847467 xmax: 128.6997 ymax: 60.44009
Geodetic CRS: WGS 84
ggplot() +
geom_sf(data = world_map, aes(geometry = geometry)) +
geom_sf(data = eucdov_range_vect["scientific_name"], aes(geometry = geom), fill = "red")
Extract cities from eBird range
sf::sf_use_s2(FALSE)
existing_eucdov_cities = urban_columbidae_distributions$city_id[urban_columbidae_distributions$SCI_NAME == 'Streptopelia decaocto']
eucdov_distribution = st_join(initial_city_selection, eucdov_range_vect)
although coordinates are longitude/latitude, st_intersects assumes that they are planar
eucdov_distribution[!is.na(eucdov_distribution$species_code) & !(eucdov_distribution$city_id %in% existing_eucdov_cities),]
Simple feature collection with 116 features and 12 fields
Geometry type: POLYGON
Dimension: XY
Bounding box: xmin: -123.2852 ymin: 16.69475 xmax: 126.8399 ymax: 51.22359
Geodetic CRS: WGS 84
missing_eucdov_cities = data.frame(
species_name = 'Streptopelia decaocto',
city_id = eucdov_distribution$city_id[!is.na(eucdov_distribution$species_code) & !(eucdov_distribution$city_id %in% existing_eucdov_cities)],
city_name= eucdov_distribution$city_name[!is.na(eucdov_distribution$species_code) & !(eucdov_distribution$city_id %in% existing_eucdov_cities)],
origin = 'Introduced',
seasonal = 'Resident',
presence = 'Extant'
)
missing_eucdov_cities
Existing range from Birdlife
sf::sf_use_s2(FALSE)
rocdov_vect = st_simplify(columbidaeDistribution[columbidaeDistribution$SCI_NAME == 'Columba livia', c('PRESENCE')], dTolerance = 0.02)
Warning: st_simplify does not correctly simplify longitude/latitude data, dTolerance needs to be in decimal degrees
ggplot() +
geom_sf(data = world_map, aes(geometry = geometry)) +
geom_sf(data = rocdov_vect, aes(geometry = geometry), fill = "red")
Range from eBird
sf::sf_use_s2(FALSE)
existing_rocpig_cities = urban_columbidae_distributions$city_id[urban_columbidae_distributions$SCI_NAME == 'Columba livia']
rocpig_distribution = st_join(initial_city_selection, rocpig_range_vect)
although coordinates are longitude/latitude, st_intersects assumes that they are planar
rocpig_distribution[!is.na(rocpig_distribution$species_code) & !(rocpig_distribution$city_id %in% existing_rocpig_cities),]
Simple feature collection with 453 features and 12 fields
Geometry type: POLYGON
Dimension: XY
Bounding box: xmin: -158.043 ymin: -38.11825 xmax: 141.5939 ymax: 53.66794
Geodetic CRS: WGS 84
missing_rocpig_cities = data.frame(
species_name = 'Columba livia',
city_id = rocpig_distribution$city_id[!is.na(rocpig_distribution$species_code) & !(rocpig_distribution$city_id %in% existing_rocpig_cities)],
city_name= rocpig_distribution$city_name[!is.na(rocpig_distribution$species_code) & !(rocpig_distribution$city_id %in% existing_rocpig_cities)],
origin = 'Introduced',
seasonal = 'Resident',
presence = 'Extant'
)
missing_rocpig_cities
Existing range from Birdlife
Range from eBird
EBIRD_SPODOV_RANGE = '/Users/james/Dropbox/PhD/eBird/spodov_range_2022/spodov_range_2022.gpkg'
spodov_range_vect = st_read(EBIRD_SPODOV_RANGE)
Reading layer `range' from data source `/Users/james/Dropbox/PhD/eBird/spodov_range_2022/spodov_range_2022.gpkg' using driver `GPKG'
Simple feature collection with 1 feature and 8 fields
Geometry type: MULTIPOLYGON
Dimension: XY
Bounding box: xmin: -180 ymin: -43.72339 xmax: 180 ymax: 44.8739
Geodetic CRS: WGS 84
ggplot() +
geom_sf(data = world_map, aes(geometry = geometry)) +
geom_sf(data = spodov_range_vect["scientific_name"], aes(geometry = geom), fill = "red")
sf::sf_use_s2(FALSE)
existing_spodov_cities = urban_columbidae_distributions$city_id[urban_columbidae_distributions$SCI_NAME %in% c('Spilopelia chinensis','Spilopelia suratensis','Patagioenas albipennis')]
spodov_distribution = st_join(initial_city_selection, spodov_range_vect)
although coordinates are longitude/latitude, st_intersects assumes that they are planar
spodov_distribution[!is.na(spodov_distribution$species_code) & !(spodov_distribution$city_id %in% existing_spodov_cities),]
Simple feature collection with 29 features and 12 fields
Geometry type: POLYGON
Dimension: XY
Bounding box: xmin: 70.54817 ymin: 27.96718 xmax: 125.8892 ymax: 43.98709
Geodetic CRS: WGS 84
missing_spodov_cities = data.frame(
species_name = 'Spilopelia chinensis',
city_id = spodov_distribution$city_id[!is.na(spodov_distribution$species_code) & !(spodov_distribution$city_id %in% existing_spodov_cities)],
city_name= spodov_distribution$city_name[!is.na(spodov_distribution$species_code) & !(spodov_distribution$city_id %in% existing_spodov_cities)],
origin = 'Introduced',
seasonal = 'Resident',
presence = 'Extant'
)
missing_spodov_cities
urban_distribution = rbind(
data.frame(
species_name = urban_columbidae_distributions$binomil,
city_id = urban_columbidae_distributions$city_id,
city_name= urban_columbidae_distributions$city_name,
origin = urban_columbidae_distributions$origin_desc,
seasonal = urban_columbidae_distributions$seasonal_desc,
presence = urban_columbidae_distributions$presence_desc
),
rbind(missing_eucdov_cities, rbind(missing_rocpig_cities, missing_spodov_cities))
)
Warning: Unknown or uninitialised column: `binomil`.Error in data.frame(species_name = urban_columbidae_distributions$binomil, :
arguments imply differing number of rows: 0, 6633
urban_distribution = read_csv(BIRDLIFE_URBAN_DISTRIBUTION)
Rows: 7231 Columns: 6── Column specification ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Delimiter: ","
chr (5): species_name, city_name, origin, seasonal, presence
dbl (1): city_id
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Species in Manchester’s regional pool
urban_distribution %>% filter(city_name == 'Manchester')
Species in Miami’s regional pool
urban_distribution %>% filter(city_name == 'Miami')
Cities with Common Woodpigeon in regional pool
urban_distribution %>% filter(species_name == 'Columba palumbus')
Cities with Collared Dove in regional pool
urban_distribution %>% filter(species_name == 'Streptopelia decaocto')
Regional pool sizes
urban_distribution %>% group_by(city_id, city_name) %>% summarise(pool_size = n()) %>% arrange(pool_size)
`summarise()` has grouped output by 'city_id'. You can override using the `.groups` argument.